6473653e65dc73a0bf88804211689898cc2614e2,components/camel-netty4/src/main/java/org/apache/camel/component/netty4/handlers/ClientChannelHandler.java,ClientChannelHandler,exceptionCaught,#ChannelHandlerContext#Throwable#,59
Before Change
// the state may not be set
if (exchange != null && callback != null) {
// set the cause on the exchange
exchange.setException(cause);
// close channel in case an exception was thrown
NettyHelper.close(ctx.channel());
After Change
// the state may not be set
if (exchange != null && callback != null) {
Throwable initialCause = exchange.getException();
if (initialCause != null && initialCause.getCause() == null) {
initialCause.initCause(cause);
} else {
// set the cause on the exchange
exchange.setException(cause);
}
// close channel in case an exception was thrown